package com.jiucang.dataview.mybatis.controller;

import com.jiucang.dataview.mybatis.bean.User;
import com.jiucang.dataview.mybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    private UserService service;

    @GetMapping("users")
    public List<User> users() {
        return service.getUsers();
    }
}
